<template>
  <div class="back-box">
    <div v-for="(item,index) in list" :key="item.name" :class="index!== list.length - 1?'gray':'last-item'">
      <span><a :href="item.path">{{ item.name }}</a></span>
      <span v-if="index!== list.length - 1">></span>
    </div>
  </div>
</template>

<script lang="ts" setup>
import { NestedType } from './nested'
withDefaults(defineProps<{
  list?: Array<NestedType>
}>(), {
  list: () => {
    return [{ name: '首页', path: '/' }]
  }
})

</script>

<style lang="less" scoped>
@import "./index.less";
</style>
